home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Games / NetHack 3.1.3 / source / src / dog.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-08-01  |  15.1 KB  |  594 lines  |  [TEXT/R*ch]

  1. /*    SCCS Id: @(#)dog.c    3.1    93/06/19    */
  2. /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  3. /* NetHack may be freely redistributed.  See license for details. */
  4.  
  5. #include "hack.h"
  6. #include "edog.h"
  7.  
  8. #define domestic(mtmp)    (mtmp->data->msound == MS_BARK || \
  9.              mtmp->data->msound == MS_MEW)
  10.  
  11. #ifdef OVLB
  12.  
  13. static int NDECL(pet_type);
  14.  
  15. void
  16. initedog(mtmp)
  17. register struct monst *mtmp;
  18. {
  19.     mtmp->mtame = domestic(mtmp) ? 10 : 5;
  20.     mtmp->mpeaceful = 1;
  21.     set_malign(mtmp); /* recalc alignment now that it's tamed */
  22.     mtmp->mleashed = 0;
  23.     mtmp->meating = 0;
  24.     EDOG(mtmp)->droptime = 0;
  25.     EDOG(mtmp)->dropdist = 10000;
  26.     EDOG(mtmp)->apport = 10;
  27.     EDOG(mtmp)->whistletime = 0;
  28.     EDOG(mtmp)->hungrytime = 1000 + moves;
  29. }
  30.  
  31. static int
  32. pet_type()
  33. {
  34.     register int pettype;
  35.  
  36.     switch (pl_character[0]) {
  37.         /* some character classes have restricted ideas of pets */
  38.         case 'C':
  39.         case 'S':
  40.             pettype = PM_LITTLE_DOG;
  41.             break;
  42.         case 'W':
  43.             pettype = PM_KITTEN;
  44.             break;
  45.         /* otherwise, see if the player has a preference */
  46.         default:
  47.             if (preferred_pet == 'c')
  48.                 pettype = PM_KITTEN;
  49.             else if (preferred_pet == 'd')
  50.                 pettype = PM_LITTLE_DOG;
  51.             else    pettype = rn2(2) ? PM_KITTEN : PM_LITTLE_DOG;
  52.             break;
  53.     }
  54.     return pettype;
  55. }
  56.  
  57. void
  58. make_familiar(otmp,x,y)
  59. register struct obj *otmp;
  60. xchar x, y;
  61. {
  62.     register struct monst *mtmp;
  63.     register struct permonst *pm;
  64.  
  65. top:
  66.     if (otmp) pm = &mons[otmp->corpsenm]; /* Figurine; otherwise spell */
  67.     else if (rn2(3)) {
  68.         if (!(pm = rndmonst())) {
  69.         pline("There seems to be nothing available for a familiar.");
  70.         return;
  71.         }
  72.     }
  73.     else pm = &mons[pet_type()];
  74.  
  75.     pm->pxlth += sizeof(struct edog);
  76.     mtmp = makemon(pm, x, y);
  77.     pm->pxlth -= sizeof(struct edog);
  78.     if (!mtmp) { /* monster was genocided */
  79.         if (otmp)
  80.         pline("The figurine writhes and then shatters into pieces!");
  81.         else goto top;
  82.         /* rndmonst() returns something not genocided always, so this
  83.          * means it was a cat or dog; loop back to try again until
  84.          * either rndmonst() is called, or if only one of cat/dog
  85.          * was genocided, they get the other.
  86.          */
  87.         return;
  88.     }
  89.     initedog(mtmp);
  90.     mtmp->msleep = 0;
  91.     if (otmp && otmp->cursed) { /* cursed figurine */
  92.         You("get a bad feeling about this.");
  93.         mtmp->mtame = mtmp->mpeaceful = 0;
  94.         newsym(mtmp->mx, mtmp->my);
  95.     }
  96.     set_malign(mtmp); /* more alignment changes */
  97. #ifdef MUSE
  98.     /* must wield weapon immediately since pets will otherwise drop it */
  99.     if (mtmp->mtame && attacktype(mtmp->data, AT_WEAP)) {
  100.         mtmp->weapon_check = NEED_HTH_WEAPON;
  101.         (void) mon_wield_item(mtmp);
  102.     }
  103. #endif
  104. }
  105.  
  106. struct monst *
  107. makedog()
  108. {
  109.     register struct monst *mtmp;
  110.     char *petname;
  111.     int   pettype;
  112.     static int petname_used = 0;
  113.  
  114.     pettype = pet_type();
  115.     if (pettype == PM_LITTLE_DOG)
  116.         petname = dogname;
  117.     else
  118.         petname = catname;
  119.  
  120.     mons[pettype].pxlth = sizeof(struct edog);
  121.     mtmp = makemon(&mons[pettype], u.ux, u.uy);
  122.     mons[pettype].pxlth = 0;
  123.  
  124.     if(!mtmp) return((struct monst *) 0); /* pets were genocided */
  125.  
  126.     if (!petname_used++ && *petname)
  127.         mtmp = christen_monst(mtmp, petname);
  128.  
  129.     initedog(mtmp);
  130.     return(mtmp);
  131. }
  132.  
  133. void
  134. losedogs()
  135. {
  136.     register struct monst *mtmp, *mtmp0 = 0, *mtmp2;
  137.     int num_segs;
  138.  
  139.     while ((mtmp = mydogs) != 0) {
  140.         mydogs = mtmp->nmon;
  141.         mtmp->nmon = fmon;
  142.         fmon = mtmp;
  143.         if (mtmp->isshk)
  144.             set_residency(mtmp, FALSE);
  145.  
  146.         num_segs = mtmp->wormno;
  147.         /* baby long worms have no tail so don't use is_longworm() */
  148.         if ( (mtmp->data == &mons[PM_LONG_WORM]) &&
  149.              (mtmp->wormno = get_wormno()) ) {
  150.             initworm(mtmp, num_segs);
  151.             /* tail segs are not yet initialized or displayed */
  152.         } else mtmp->wormno = 0;
  153.         mnexto(mtmp);
  154.     }
  155.  
  156.     for(mtmp = migrating_mons; mtmp; mtmp = mtmp2) {
  157.         mtmp2 = mtmp->nmon;
  158.         if(mtmp->mx == u.uz.dnum && mtmp->mux == u.uz.dlevel) {
  159.             mtmp->mx = 0;           /* save xyloc in mtmp->my */
  160.             mtmp->mux = u.ux; mtmp->muy = u.uy; /* not really req'd */
  161.             if(mtmp == migrating_mons)
  162.             migrating_mons = mtmp->nmon;
  163.             else
  164.             mtmp0->nmon = mtmp->nmon;
  165.             mtmp->nmon = fmon;
  166.             fmon = mtmp;
  167.             num_segs = mtmp->wormno;
  168.             if ( (mtmp->data == &mons[PM_LONG_WORM]) &&
  169.              (mtmp->wormno = get_wormno()) ) {
  170.             initworm(mtmp, num_segs);
  171.             /* tail segs are not yet initialized or displayed */
  172.             } else mtmp->wormno = 0;
  173.  
  174.             if(mtmp->mlstmv < monstermoves-1) {
  175.             /* heal monster for time spent in limbo */
  176.             long nmv = monstermoves - mtmp->mlstmv - 1;
  177.  
  178.             /* might stop being afraid, blind or frozen */
  179.             /* set to 1 and allow final decrement in movemon() */
  180.             if(nmv >= (long)mtmp->mblinded) mtmp->mblinded = 1;
  181.             else mtmp->mblinded -= nmv;
  182.             if(nmv >= (long)mtmp->mfrozen) mtmp->mfrozen = 1;
  183.             else mtmp->mfrozen -= nmv;
  184.             if(nmv >= (long)mtmp->mfleetim) mtmp->mfleetim = 1;
  185.             else mtmp->mfleetim -= nmv;
  186.  
  187.             /* might be able to use special ability again */
  188.             if(nmv > (long)mtmp->mspec_used) mtmp->mspec_used = 0;
  189.             else mtmp->mspec_used -= nmv;
  190.  
  191.             /* reduce tameness for every 150 moves you are away */
  192.             if (mtmp->mtame > nmv/150) mtmp->mtame -= nmv/150;
  193.             else mtmp->mtame = 0;
  194.  
  195.             /* let monster move a bit on the new level */
  196.             /* see placement code below */
  197.             mtmp->mx = min(nmv, 8);
  198. #ifdef MULDGN
  199.             /*    temporary hack...
  200.              * Ft.Ludios' entry chamber isn't classified as a
  201.              * room by lev_comp and any movement greater than
  202.              * 1 can result in placement beyond solid walls.
  203.              */
  204.             if (Is_knox(&u.uz)) mtmp->mx = 1;
  205. #endif
  206.  
  207.             if(!regenerates(mtmp->data)) nmv /= 20;
  208.             if((long)mtmp->mhp + nmv >= (long)mtmp->mhpmax)
  209.                 mtmp->mhp = mtmp->mhpmax;
  210.             else mtmp->mhp += nmv;
  211.             mtmp->mlstmv = monstermoves-1;
  212.             }
  213.  
  214.             if (mtmp->data->geno & G_GENOD) {
  215. #ifdef KOPS
  216.             allow_kops = FALSE;
  217. #endif
  218.             mondead(mtmp);    /* must put in fmon list first */
  219. #ifdef KOPS
  220.             allow_kops = TRUE;
  221. #endif
  222.             } else if (mtmp->isshk && mtmp->mpeaceful)
  223.             home_shk(mtmp, TRUE);
  224.             else switch(mtmp->my) {
  225.             xchar xlocale, ylocale;
  226.             register struct trap *t;
  227.  
  228.             case 1: xlocale = xupstair; ylocale = yupstair;
  229.                 goto common;
  230.             case 2: xlocale = xdnstair; ylocale = ydnstair;
  231.                 goto common;
  232.             case 3: xlocale = xupladder; ylocale = yupladder;
  233.                 goto common;
  234.             case 4: xlocale = xdnladder; ylocale = ydnladder;
  235.                 goto common;
  236.             case 5: xlocale = sstairs.sx; ylocale = sstairs.sy;
  237.                 goto common;
  238.             case 6:        /* portal */
  239.                 for (t = ftrap; t; t = t->ntrap)
  240.                     if (t->ttyp == MAGIC_PORTAL) break;
  241.                 if (t) {
  242.                     xlocale = t->tx;
  243.                     ylocale = t->ty;
  244.                 } else {
  245.                     if (!In_endgame(&u.uz))
  246.                   impossible("losedogs: no corresponding portal?");
  247.                     xlocale = ylocale = 0;
  248.                 }
  249.                 goto common;
  250. common:
  251.                 if (xlocale && mtmp->mx) {
  252.                     /* monster moved a bit */
  253.                     /* pick a nearby location */
  254.                     /* mnearto() deals w/stone, et al */
  255.                     char *r = in_rooms(xlocale, ylocale, 0);
  256.                     if (r && *r) {
  257.                     coord c;
  258.                     /* somexy() handles irregular rooms */
  259.                     if (somexy(&rooms[*r - ROOMOFFSET], &c))
  260.                         xlocale = c.x,  ylocale = c.y;
  261.                     else
  262.                         xlocale = ylocale = 0;
  263.                     } else {
  264.                     int i, j;
  265.                     i = max(1, xlocale - mtmp->mx);
  266.                     j = min(COLNO-1, xlocale + mtmp->mx);
  267.                     xlocale = rn1(j - i, i);
  268.                     i = max(0, ylocale - mtmp->mx);
  269.                     j = min(ROWNO-1, ylocale + mtmp->mx);
  270.                     ylocale = rn1(j - i, i);
  271.                     }
  272.                 }
  273.                 if (xlocale) {
  274.                     (void) mnearto(mtmp,
  275.                            xlocale, ylocale, FALSE);
  276.                     break;
  277.                 } /* else fall through */
  278.             default: 
  279.                 rloc(mtmp);
  280.                 break;
  281.             }
  282.         } else
  283.             mtmp0 = mtmp;
  284.         if (mtmp->isshk)
  285.             set_residency(mtmp, FALSE);
  286.     }
  287. }
  288.  
  289. #endif /* OVLB */
  290. #ifdef OVL2
  291.  
  292. void
  293. keepdogs()
  294. {
  295.     register struct monst *mtmp;
  296.     register struct obj *obj;
  297.     int num_segs = 0;
  298.  
  299.     for(mtmp = fmon; mtmp; mtmp = mtmp->nmon)
  300.         if(((monnear(mtmp, u.ux, u.uy) && levl_follower(mtmp)) ||
  301.         /* the wiz will level t-port from anywhere to chase
  302.            the amulet; if you don't have it, will chase you
  303.            only if in range. -3. */
  304.             (u.uhave.amulet && mtmp->iswiz))
  305.             && !mtmp->msleep && mtmp->mcanmove) {
  306.  
  307.         /* long worms can now change levels! - Norm */
  308.  
  309.         if (mtmp->mtame && mtmp->meating && canseemon(mtmp)) {
  310.             pline("%s is still eating.", Monnam(mtmp));
  311.             goto merge;
  312.         }
  313.         if (mon_has_amulet(mtmp)) {
  314.             pline("%s seems very disoriented for a moment.",
  315.                 Monnam(mtmp));
  316.         merge:
  317. #ifdef WALKIES
  318.             if (mtmp->mleashed) {
  319.                 pline("%s leash suddenly comes loose.",
  320.                     humanoid(mtmp->data)
  321.                         ? (mtmp->female ? "Her" : "His")
  322.                         : "Its");
  323.                 m_unleash(mtmp);
  324.             }
  325. #endif
  326.             continue;
  327.         }
  328.         if (mtmp->isshk)
  329.             set_residency(mtmp, TRUE);
  330.  
  331.         if (mtmp->wormno) {
  332.             register int cnt;
  333.             /* NOTE: worm is truncated to # segs = max wormno size */
  334.             cnt = count_wsegs(mtmp);
  335.             num_segs = min(cnt, MAX_NUM_WORMS - 1);
  336.             wormgone(mtmp);
  337.         }
  338.  
  339.         /* set minvent's obj->no_charge to 0 */
  340.         for(obj = mtmp->minvent; obj; obj = obj->nobj) {
  341.             if (Has_contents(obj))
  342.             picked_container(obj);    /* does the right thing */
  343.             obj->no_charge = 0;
  344.         }
  345.  
  346.         relmon(mtmp);
  347.         newsym(mtmp->mx,mtmp->my);
  348.         mtmp->mx = mtmp->my = 0; /* avoid mnexto()/MON_AT() problem */
  349.         mtmp->wormno = num_segs;
  350.         mtmp->nmon = mydogs;
  351.         mydogs = mtmp;
  352.         keepdogs();    /* we destroyed the link, so use recursion */
  353.         return;        /* (admittedly somewhat primitive) */
  354.     }
  355. }
  356.  
  357. #endif /* OVL2 */
  358. #ifdef OVLB
  359.  
  360. void
  361. migrate_to_level(mtmp, tolev, xyloc) 
  362.     register struct monst *mtmp; 
  363.     xchar tolev;      /* destination level */
  364.     xchar xyloc;    /* destination xy location: */
  365.             /*     0: rnd,
  366.              *    1: <,
  367.              *    2: >,
  368.              *    3: < ladder,
  369.              *    4: > ladder,
  370.              *    5: sstairs
  371.              *    6: portal
  372.              */ 
  373. {
  374.         register struct obj *obj;
  375.     int num_segs = 0;    /* count of worm segments */
  376.  
  377.     if (mtmp->isshk)
  378.         set_residency(mtmp, TRUE);
  379.  
  380.     if (mtmp->wormno) {
  381.         register int cnt;
  382.       /* **** NOTE: worm is truncated to # segs = max wormno size **** */
  383.         cnt = count_wsegs(mtmp);
  384.         num_segs = min(cnt, MAX_NUM_WORMS - 1);
  385.         wormgone(mtmp);
  386.     }
  387.  
  388.     /* set minvent's obj->no_charge to 0 */
  389.     for(obj = mtmp->minvent; obj; obj = obj->nobj) {
  390.         if (Has_contents(obj))
  391.         picked_container(obj);    /* does the right thing */
  392.         obj->no_charge = 0;
  393.     }
  394.  
  395.     relmon(mtmp);
  396.     mtmp->nmon = migrating_mons;
  397.     migrating_mons = mtmp;
  398. #ifdef WALKIES
  399.     if (mtmp->mleashed)  {
  400.         m_unleash(mtmp);
  401.         mtmp->mtame--;
  402.         pline("The leash comes off!");
  403.     }
  404. #endif
  405.     newsym(mtmp->mx,mtmp->my);
  406.     /* make sure to reset mtmp->[mx,my] to 0 when releasing, */
  407.     /* so rloc() on next level doesn't affect MON_AT() state */
  408.     mtmp->mx = ledger_to_dnum((xchar)tolev); 
  409.     mtmp->mux = ledger_to_dlev((xchar)tolev); 
  410.     mtmp->my = xyloc;
  411.     mtmp->muy = 0;
  412.     mtmp->wormno = num_segs;
  413.     mtmp->mlstmv = monstermoves;
  414. }
  415.  
  416. #endif /* OVLB */
  417. #ifdef OVL1
  418.  
  419. /* return quality of food; the lower the better */
  420. /* fungi will eat even tainted food */
  421. int
  422. dogfood(mon,obj)
  423. struct monst *mon;
  424. register struct obj *obj;
  425. {
  426.     boolean carni = carnivorous(mon->data);
  427.     boolean herbi = herbivorous(mon->data);
  428.     struct permonst *fptr = &mons[obj->corpsenm];
  429.  
  430.     switch(obj->oclass) {
  431.     case FOOD_CLASS:
  432.         if (obj->otyp == CORPSE &&
  433.         ((obj->corpsenm == PM_COCKATRICE && !resists_ston(mon->data))
  434.          || is_rider(fptr)))
  435.             return TABU;
  436.  
  437.         if (!carni && !herbi)
  438.             return (obj->cursed ? UNDEF : APPORT);
  439.  
  440.         switch (obj->otyp) {
  441.         case TRIPE_RATION:
  442.             return (carni ? DOGFOOD : MANFOOD);
  443.         case EGG:
  444.             if (obj->corpsenm == PM_COCKATRICE &&
  445.                         !resists_ston(mon->data))
  446.             return POISON;
  447.             return (carni ? CADAVER : MANFOOD);
  448.         case CORPSE:
  449.             if ((obj->age+50 <= monstermoves
  450.                         && obj->corpsenm != PM_LIZARD
  451.                         && mon->data->mlet != S_FUNGUS) ||
  452.             (acidic(&mons[obj->corpsenm]) &&
  453.                         !resists_acid(mon->data)) ||
  454.             (poisonous(&mons[obj->corpsenm]) &&
  455.                         !resists_poison(mon->data)))
  456.             return POISON;
  457.             else if (fptr->mlet == S_FUNGUS)
  458.             return (herbi ? CADAVER : MANFOOD);
  459.             else if (is_meaty(fptr))
  460.                 return (carni ? CADAVER : MANFOOD);
  461.             else return (carni ? ACCFOOD : MANFOOD);
  462.         case CLOVE_OF_GARLIC:
  463.             return (is_undead(mon->data) ? TABU :
  464.                 (herbi ? ACCFOOD : MANFOOD));
  465.         case TIN:
  466.             return (metallivorous(mon->data) ? ACCFOOD : MANFOOD);
  467.         case APPLE:
  468.         case CARROT:
  469.             return (herbi ? DOGFOOD : MANFOOD);
  470.         case BANANA:
  471.             return ((mon->data->mlet == S_YETI) ? DOGFOOD :
  472.                 (herbi ? ACCFOOD : MANFOOD));
  473.         default:
  474. #ifdef TUTTI_FRUTTI
  475.             return (obj->otyp > SLIME_MOLD ?
  476. #else
  477.             return (obj->otyp > CLOVE_OF_GARLIC ?
  478. #endif
  479.                 (carni ? ACCFOOD : MANFOOD) :
  480.                 (herbi ? ACCFOOD : MANFOOD));
  481.         }
  482.     default:
  483.         if (hates_silver(mon->data) && 
  484.         objects[obj->otyp].oc_material == SILVER)
  485.         return(TABU);
  486.         if (mon->data == &mons[PM_GELATINOUS_CUBE] && is_organic(obj))
  487.         return(ACCFOOD);
  488.         if (metallivorous(mon->data) && is_metallic(obj))
  489.         /* Ferrous based metals are preferred. */
  490.         return(objects[obj->otyp].oc_material == IRON ? DOGFOOD :
  491.                ACCFOOD);
  492.         if(!obj->cursed && obj->oclass != BALL_CLASS &&
  493.                         obj->oclass != CHAIN_CLASS)
  494.         return(APPORT);
  495.         /* fall into next case */
  496.     case ROCK_CLASS:
  497.         return(UNDEF);
  498.     }
  499. }
  500.  
  501. #endif /* OVL1 */
  502. #ifdef OVLB
  503.  
  504. struct monst *
  505. tamedog(mtmp, obj)
  506. register struct monst *mtmp;
  507. register struct obj *obj;
  508. {
  509.     register struct monst *mtmp2;
  510.  
  511.     /* The Wiz, Medusa and the quest nemeses aren't even made peaceful. */
  512.     if (mtmp->iswiz || mtmp->data == &mons[PM_MEDUSA]
  513. #ifdef MULDGN
  514.         || (mtmp->data->mflags3 & M3_WANTSARTI)
  515. #endif
  516.         )
  517.         return((struct monst *)0);
  518.  
  519.     /* worst case, at least it'll be peaceful. */
  520.     mtmp->mpeaceful = 1;
  521.     set_malign(mtmp);
  522.     if(flags.moonphase == FULL_MOON && night() && rn2(6) && obj
  523.                         && mtmp->data->mlet == S_DOG)
  524.         return((struct monst *)0);
  525.  
  526.     /* If we cannot tame it, at least it's no longer afraid. */
  527.     mtmp->mflee = 0;
  528.     mtmp->mfleetim = 0;
  529.     /* feeding it treats makes it tamer */
  530.     if (mtmp->mtame && mtmp->mtame < 20 && 
  531.         obj && dogfood(mtmp, obj) > ACCFOOD)
  532.         mtmp->mtame++;
  533.     if(mtmp->mtame || !mtmp->mcanmove ||
  534.        /* monsters with conflicting structures cannot be tamed */
  535.        mtmp->isshk || mtmp->isgd || mtmp->ispriest || mtmp->isminion ||
  536. #ifdef POLYSELF
  537.        is_human(mtmp->data) || (is_demon(mtmp->data) && !is_demon(uasmon))
  538. #else
  539.        is_human(mtmp->data) || is_demon(mtmp->data)
  540. #endif
  541.        || (mtmp->data->mflags3 &
  542.            (M3_WANTSAMUL|M3_WANTSBELL|M3_WANTSBOOK|M3_WANTSCAND))
  543.        )
  544.         return((struct monst *)0);
  545.     if(obj) {
  546.         if(dogfood(mtmp, obj) >= MANFOOD) return((struct monst *)0);
  547.         if(cansee(mtmp->mx,mtmp->my))
  548.             pline("%s devours %s.", Monnam(mtmp), the(xname(obj)));
  549.         obfree(obj, (struct obj *)0);
  550.     }
  551.     if (u.uswallow && mtmp == u.ustuck)
  552.         expels(mtmp, mtmp->data, TRUE);
  553.     else if (mtmp == u.ustuck
  554. #ifdef POLYSELF
  555.          && !(u.mtimedone && sticks(uasmon))
  556. #endif
  557.          )
  558.         unstuck(mtmp);
  559.     mtmp2 = newmonst(sizeof(struct edog) + mtmp->mnamelth);
  560.     *mtmp2 = *mtmp;
  561.     mtmp2->mxlth = sizeof(struct edog);
  562.     if(mtmp->mnamelth) Strcpy(NAME(mtmp2), NAME(mtmp));
  563.     initedog(mtmp2);
  564.     replmon(mtmp,mtmp2);
  565.     newsym(mtmp2->mx, mtmp2->my);
  566. #ifdef MUSE
  567.     if (attacktype(mtmp2->data, AT_WEAP)) {
  568.         mtmp2->weapon_check = NEED_HTH_WEAPON;
  569.         (void) mon_wield_item(mtmp2);
  570.     }
  571. #endif
  572.     return(mtmp2);
  573. }
  574.  
  575. void
  576. abuse_dog(mtmp)
  577. struct monst *mtmp;
  578. {
  579.     if (!mtmp->mtame) return;
  580.  
  581.     if (Aggravate_monster || Conflict) mtmp->mtame /=2;
  582.     else mtmp->mtame--;
  583.  
  584. #ifdef SOUNDS
  585.     if (mtmp->mtame && rn2(mtmp->mtame)) yelp(mtmp);
  586.     else growl(mtmp);    /* give them a moment's worry */
  587. #endif
  588.     if (!mtmp->mtame) newsym(mtmp->mx, mtmp->my);
  589. }
  590.  
  591. #endif /* OVLB */
  592.  
  593. /*dog.c*/
  594.